<?php
/**
 * @copyright	Copyright (C) 2005 - 2007 Open Source Matters. All rights reserved.
 * @license		GNU/GPL, see LICENSE.php
 * Joomla! is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * See COPYRIGHT.php for copyright notices and details.
 */

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
include_once (dirname(__FILE__).DS.'/ja_templatetools.php');

$tmpTools = new JA_Tools($this);
$tmpTools->setColorThemes(array('blue','orange','green'));
$ja_template_name = 'ja_antares';

//Main navigation
$japarams = new JParameter('');
$japarams->set( 'menu_images_align', 'left' );
$japarams->set( 'menutype', 'mainmenu' );
$japarams->set( 'menupath', $tmpTools->templateurl() .'/ja_menus');
$menu = '';
switch ($tmpTools->getParam(JA_TOOL_MENU)) {
	case 3:
		$menu = "Transmenu";
		include_once( dirname(__FILE__).DS.'ja_menus/'.$menu.'.class.php' );
		break;
	case 2:
		$menu = "CSSmenu";
		include_once( dirname(__FILE__).DS.'ja_menus/'.$menu.'.class.php' );
		break;
	case 1:	
	default:
		$menu = "Splitmenu";
		include_once( dirname(__FILE__).DS.'ja_menus/'.$menu.'.class.php' );
		break;
}
$menuclass = "JA_$menu";
$jamenu = new $menuclass ($japarams);
$hasSubnav = false;
if ($jamenu->hasSubMenu (1) && $jamenu->showSeparatedSub ) 
	$hasSubnav = true;
//End for main navigation
$ja_left = $this->countModules( 'left' );
if( !$this->countModules('header') ) $ja_left++;
if ($hasSubnav) $ja_left++;
$ja_right = $this->countModules( 'right' );

if ( $ja_left && $ja_right ) {
	$divid = '';
	} elseif ( $ja_left ) { 
	$divid = '-fr';
	} elseif ( $ja_right ) {
	$divid = '-fl';
	} else {
	$divid = '-f';
}

# Top Spotlight ##########
$topmodule = 0;
if( $this->countModules('user8') ) $topmodule++;
if( $this->countModules('user9') ) $topmodule++;
if( $this->countModules('top') ) $topmodule++;

if ( $topmodule == 3 ) {
	$divtopwidth = '33.3%';
} else if ($topmodule == 2) {
	$divtopwidth = '50%';
} else if ($topmodule == 1) {
	$divtopwidth = '100%';
}

$user8divstyle = "";
$user9divstyle = "";
$topdivstyle=" box-ended";
if( !$this->countModules('top') ) {
  $user9divstyle=" box-ended";
}
if ( $topmodule == 3 ) {
	$user9divstyle = " box-centered";
}
if ( $topmodule == 1 ) {
	$user8divstyle =$topdivstyle = $user9divstyle = " box-fulled";
}


# Bottom Spotlight ##########
$bottommodule = 0;
if ($this->countModules('user1')) $bottommodule++;
if ($this->countModules('user2')) $bottommodule++;
if ($this->countModules('newsflash')) $bottommodule++;

if ( $bottommodule == 3 ) {
	$divbotwidth = '32%';
} else if ($bottommodule == 2) {
	$divbotwidth = '49%';
} else if ($bottommodule == 1) {
	$divbotwidth = '99%';
}

$user1divstyle = ""; 
$user2divstyle = ""; 
$newflashdivstyle = " box-ended"; 
if ( !$this->countModules('newsflash') ) {
	$user2divstyle = " box-ended"; 
}
if ( !$this->countModules('user2') ) {
	$user1divstyle = " box-ended"; 
}

?>
